<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 求和 */
        var sum = 0;
        var count = 1;
        while(count<=50){ 
            sum+=count;
             count++;  
            }
    
        console.log(sum);

        // 弹框提示
        var tmp = prompt("1+1=?");
        while(tmp!='2'){
            tmp = prompt("1+1=?");
        }
        console.log("...end");
    </script>
</head>
<body>
    
</body>
</html>